/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2024-02-29
 * Time:8:15
 */
public class Solution {
    public static boolean isUnique(String str) {
        int len = str.length();
        int a = 0;
        for(int i = 0;i < len;i++) {
            char ch = str.charAt(i);
            int distance = ch-'a';
            if(((a >> distance) & 1 ) == 1) return false;
            a = ((1 << distance) | a);
        }
        return true;
    }
/////////////////////////////////////////////////////
    public static void reverseString(char[] s) {
        int len = s.length;
        int left = 0,right = len-1;
        while(left < right) {
            char tmp = s[left];
            s[left] = s[right];
            s[right] = tmp;
            left++;
            right--;
        }
    }



}
